<%@page import="javax.swing.text.Document"%> 
<%@page import="java.util.Date"%> 
<%@ page import="java.util.HashMap"%>
<%@ page import="java.util.Map"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>支付宝即时到账批量退款有密接口</title>
		<script type="text/javascript" src="http://cdn.bootcss.com/jquery/1.10.2/jquery.min.js"></script>
	</head>
	<script type="text/javascript" charset="big5">

		var data = {};
		data.id = '${param.id}';
		data.adminId = '${param.adminId}';

        $.post('${contextPath }/api/refund/auditingAdopt', data).done(
			function(result) {
				if (result.code == 200) {
	                var refund = result.data;
	               
	                var data = {};
					data.service = 'refund_fastpay_by_platform_pwd';
					data.partner = '2088712191155141';
					data._input_charset = 'utf-8';
					data.notify_url = 'http://bear007.com/etcs/callBack/alipayConsumeRefund';
					data.seller_email = 'tengshi2014@163.com';
					data.refund_date = refund.auditingDate;
					data.batch_no = refund.refundNo;
					data.batch_num = '1';
					data.detail_data = refund.tradeNo+'^'+refund.amount+'^'+refund.cause;
					
	                $.ajax({
		                url : '${contextPath }/api/refund/alipayRefund?data='+JSON.stringify(data),
		                type : 'GET',
		                success : function(result) {
							document.write(result.data);
		                }
		            });
					
				}
			}
		);

	</script>
	<body>
	</body>
</html>
